{extend name="public:base" /}
{block name="content"}
<link rel="stylesheet" href="__ADMIN__/css/index.css" />	
<div class="row">
	<div class="col-xs-12">	
		    <div class="row">
		      <div class="col-lg-3 col-md-3 col-sm-6">
					<div class="tile">
						<div class="tile-heading">
							今日订单
							<span class="pull-right"> 总{$total_order}单</span>
						</div>
						<div class="tile-body">
							<i class="fa fa-shopping-cart"></i>
							<h2 class="pull-right">{$today_order}</h2>
						</div>
						<div class="tile-footer">
							<a href="{:url('member/OrderBackend/index')}">显示详细...</a>
						</div>
					</div>
			  </div>
		      <div class="col-lg-3 col-md-3 col-sm-6">
					<div class="tile">
					<div class="tile-heading">
					今日销售额 
					<span class="pull-right"> 总{$total_money} </span>
					</div>
					<div class="tile-body">
					<i class="fa fa-credit-card"></i>
					<h2 class="pull-right">{$today_money}</h2>
					</div>
					<div class="tile-footer">
					<a href="{:url('member/OrderBackend/index')}">显示详细...</a>
					</div>
					</div> 	
		      </div>
		      <div class="col-lg-3 col-md-3 col-sm-6">
					<div class="tile">
					<div class="tile-heading">
					新增客户 
					<span class="pull-right"> 总{$member_count}个</span>
					</div>
					<div class="tile-body">
					<i class="fa fa-user"></i>
					<h2 class="pull-right">{$today_member}</h2>
					</div>
					<div class="tile-footer">
					<a href="{:url('member/MemberBackend/index')}">显示详细...</a>
					</div>
					</div>
			  </div>
		      <div class="col-lg-3 col-md-3 col-sm-6">
					<div class="tile">
					<div class="tile-heading">新增用户行为
					<span class="pull-right"> 总{$user_action_total}个</span>	
					</div>
					<div class="tile-body">
					<i class="fa fa-eye"></i>
					<h2 class="pull-right">{$today_user_action}个</h2>
					</div>
					<div class="tile-footer">
					<a href="{:url('admin/UserAction/index')}">显示详细...</a>
					</div>
					</div>	  
			  </div>
		    </div>
		    <div class="row">
		      <div class="col-lg-4 col-md-12 col-sm-12 col-sx-12">
				  	<div class="panel panel-default">
					<div class="panel-heading">
					<h3 class="panel-title">
					<i class="fa fa-calendar"></i>
					用户行为
					<a style="font-size: 14px" href="{:url('UserAction/index')}" class="pull-right">更多..</a>
					</h3>
					</div>
					<ul class="list-group">
						
						{volist name="user_action" id="v" empty="$uc_empty"}
							<li class="list-group-item">
							{if condition="empty($v['uname'])"}	
								<a href="{:url('member/MemberBackend/edit',array('id'=>$v['user_id']))}">{$v.user_id}</a>
							{else/}
								 {$v.uname}
							{/if}
							
							{$v.info}
							<br>
							<small class="text-muted">						
								{$v.add_time|date="Y-m-d H:i:s",###}
							</small>
							</li>	
						{/volist}
					</ul>
					</div>
			  </div>
		      <div class="col-lg-8 col-md-12 col-sm-12 col-sx-12">
		      	<div class="panel panel-default">
		      		<div class="panel-heading">
						<h3 class="panel-title">
						<i class="fa fa-shopping-cart"></i>
						最新订单
						<a style="font-size: 14px" href="{:url('member/OrderBackend/index')}" class="pull-right">更多..</a>
						</h3>
					</div>
					<div class="table-responsive">
						<table class="table">
							<thead>
							<tr>
							<td>订单号</td>
							<td>支付方式</td>
							<th>客户端</th> 
							<td>客户名称</td>
							<td>状态</td>
							<td>生成日期</td>
							<td>金额</td>
							<td>操作</td>
							</tr>
							</thead>
							<tbody>								
								{volist name="order_list" id="v" empty="$empty"}
								<tr>
									<td>
										{$v.order_num_alias}
									</td>
									<td>
										{$v.payment_code}
									</td>
									<td>
										{$v.reg_type}
									</td>
									<td>
										{if condition="$v['reg_type'] NEQ 'weixin'"}
											{$v.username}
										{else/}
											{$v.nickname}
										{/if}
									</td>
									<td>
										{$v.name}
									</td>
									<td>
										{$v.date_added|date='Y-m-d H:i:s',###}
									</td>
									<td>
										{if condition="$v['points_order'] EQ 1 "}
											积分 {$v.pay_points}
										{else/}
											&yen; {$v.total}
										{/if}										
									</td>
									<td>
										<a  class="btn btn-info" href='{:url("member/OrderBackend/show_order",array("id"=>$v["order_id"]))}'>
											<i class="fa-eye fa"></i>
										</a> 
									</td>
								</tr>
								{/volist}	
							</tbody>
						</table>
						
					</div>
		      	</div>
		      	
		      	
			  </div>
		    </div>
	</div>
</div>
{/block}
